let s = "YazaAay"
var longestNiceSubstring = function (s) {

};


const s1 = [1, 2, 3, 4]
const s2 = [9, 8, 7]
let s3 = s1.concat(s2)
console.log(s1, s3, s2);
function a(obj) {
    let newObj = {}
    for (const key in obj) {
        if (obj.hasOwnProperty(key)) {
            newObj[key] = obj[key]
        }
    }
    return newObj
}

function b(obj) {
    let newObj = {}
    for (const key in obj) {
        if (obj.hasOwnProperty(key)) {
            if (typeof obj[key] == 'object' && obj[key] !== null) {
                newObj[key] = b(obj[key])
            } else {
                newObj[key] = obj[key]
            }
        }
    }
}